<template>
  <div class="homeNav">
    <div class="navLogo">
      <img class="logoImg" src="static/img/google.svg" alt="logo">
    </div>
    <div class="navClass">
      <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
        <el-menu-item index="1">处理中心</el-menu-item>
        <el-submenu index="2">
          <template slot="title">我的工作台</template>
          <el-menu-item index="2-1">选项1</el-menu-item>
          <el-menu-item index="2-2">选项2</el-menu-item>
          <el-menu-item index="2-3">选项3</el-menu-item>
          <el-submenu index="2-4">
            <template slot="title">选项4</template>
            <el-menu-item index="2-4-1">选项1</el-menu-item>
            <el-menu-item index="2-4-2">选项2</el-menu-item>
            <el-menu-item index="2-4-3">选项3</el-menu-item>
          </el-submenu>
        </el-submenu>
        <el-menu-item index="3">消息中心</el-menu-item>
        <el-menu-item index="4">个人中心</el-menu-item>
      </el-menu>
    </div>
  </div>
</template>

<script>
import {login} from 'api/login'
export default {
  name: 'homeNav',
  data () {
    return {
      activeIndex: '1',
      getValue: ''
    }
  },
  mounted () {
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>
<style lang="less">
.homeNav {
  .el-menu {
    border: none!important;
  }
}
</style>

<style scoped lang="less">
.homeNav {
  position: relative;
  margin: 0 auto;
  width: 1200px;
  height: 60px;
  color: #2f2f2f;
  .navLogo {
    height: 60px;
    width: 200px;
    box-sizing: border-box;
    padding-top: 5px;
    .logoImg {
      height: 50px;
    }
  }
  .navClass {
    display: inline-block;
    position: absolute;
    top: 0;
    left: 700px;
  }
}
</style>
